package com.java46.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.text.SimpleDateFormat;
import java.util.Date;

public class ReservationRecord {
    private Integer resid;

    private String resname;

    private String ressex;

    private Date resdate;

    private String resdrand;


    private String resphone;


    private Integer serid;


    private String rescarmodel;


    private Date restime;

    private Integer status;

    public void setStatus(String  status) {
        this.status = Integer.parseInt(status);
    }

    public Integer getResid() {
        return resid;
    }


    public void setResid(Integer resid) {
        this.resid = resid;
    }


    public String getResname() {
        return resname;
    }

    public void setResname(String resname) {
        this.resname = resname;
    }

    public String getRessex() {
        return ressex;
    }


    public void setRessex(String ressex) {
        this.ressex = ressex;
    }

    public Date getResdate() {
        return resdate;
    }


    @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
    public void setResdate(String  resdate) {
        try {
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
            this.resdate = sdf.parse(resdate);
        }catch (Exception e){
        }


    }


    public String getResdrand() {
        return resdrand;
    }

    public void setResdrand(String resdrand) {
        this.resdrand = resdrand;
    }


    public String getResphone() {
        return resphone;
    }


    public void setResphone(String resphone) {
        this.resphone = resphone;
    }

    public Integer getSerid() {
        return serid;
    }

    public void setSerid(String serid) {
        this.serid = Integer.parseInt(serid);
    }


    public String getRescarmodel() {
        return rescarmodel;
    }


    public void setRescarmodel(String rescarmodel) {
        this.rescarmodel = rescarmodel;
    }


    public Date getRestime() {
        return restime;
    }


    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    public void setRestime(String restime) {
        try {
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            this.restime = sdf.parse(restime);
        }catch (Exception e){}

    }


}